Optimal. Leaf size=71 \[ \frac{\sqrt{a+b x} (2 a B+A b)}{a}-\frac{(2 a B+A b) \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )}{\sqrt{a}}-\frac{A (a+b x)^{3/2}}{a x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0330898, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {78, 50, 63, 208} \[ \frac{\sqrt{a+b x} (2 a B+A b)}{a}-\frac{(2 a B+A b) \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )}{\sqrt{a}}-\frac{A (a+b x)^{3/2}}{a x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 50
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{\sqrt{a+b x} (A+B x)}{x^2} \, dx &=-\frac{A (a+b x)^{3/2}}{a x}+\frac{\left (\frac{A b}{2}+a B\right ) \int \frac{\sqrt{a+b x}}{x} \, dx}{a}\\ &=\frac{(A b+2 a B) \sqrt{a+b x}}{a}-\frac{A (a+b x)^{3/2}}{a x}+\frac{1}{2} (A b+2 a B) \int \frac{1}{x \sqrt{a+b x}} \, dx\\ &=\frac{(A b+2 a B) \sqrt{a+b x}}{a}-\frac{A (a+b x)^{3/2}}{a x}+\frac{(A b+2 a B) \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b x}\right )}{b}\\ &=\frac{(A b+2 a B) \sqrt{a+b x}}{a}-\frac{A (a+b x)^{3/2}}{a x}-\frac{(A b+2 a B) \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )}{\sqrt{a}}\\ \end{align*}
Mathematica [A] time = 0.0309573, size = 53, normalized size = 0.75 \[ \frac{\sqrt{a+b x} (2 B x-A)}{x}-\frac{(2 a B+A b) \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )}{\sqrt{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 50, normalized size = 0.7 \begin{align*} 2\,B\sqrt{bx+a}-{\frac{A}{x}\sqrt{bx+a}}-{(Ab+2\,Ba){\it Artanh} \left ({\sqrt{bx+a}{\frac{1}{\sqrt{a}}}} \right ){\frac{1}{\sqrt{a}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.60306, size = 296, normalized size = 4.17 \begin{align*} \left [\frac{{\left (2 \, B a + A b\right )} \sqrt{a} x \log \left (\frac{b x - 2 \, \sqrt{b x + a} \sqrt{a} + 2 \, a}{x}\right ) + 2 \,{\left (2 \, B a x - A a\right )} \sqrt{b x + a}}{2 \, a x}, \frac{{\left (2 \, B a + A b\right )} \sqrt{-a} x \arctan \left (\frac{\sqrt{b x + a} \sqrt{-a}}{a}\right ) +{\left (2 \, B a x - A a\right )} \sqrt{b x + a}}{a x}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 10.7004, size = 155, normalized size = 2.18 \begin{align*} - \frac{A a b \sqrt{\frac{1}{a^{3}}} \log{\left (- a^{2} \sqrt{\frac{1}{a^{3}}} + \sqrt{a + b x} \right )}}{2} + \frac{A a b \sqrt{\frac{1}{a^{3}}} \log{\left (a^{2} \sqrt{\frac{1}{a^{3}}} + \sqrt{a + b x} \right )}}{2} + \frac{2 A b \operatorname{atan}{\left (\frac{\sqrt{a + b x}}{\sqrt{- a}} \right )}}{\sqrt{- a}} - \frac{A \sqrt{a + b x}}{x} + \frac{2 B a \operatorname{atan}{\left (\frac{\sqrt{a + b x}}{\sqrt{- a}} \right )}}{\sqrt{- a}} + 2 B \sqrt{a + b x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.21623, size = 82, normalized size = 1.15 \begin{align*} \frac{2 \, \sqrt{b x + a} B b - \frac{\sqrt{b x + a} A b}{x} + \frac{{\left (2 \, B a b + A b^{2}\right )} \arctan \left (\frac{\sqrt{b x + a}}{\sqrt{-a}}\right )}{\sqrt{-a}}}{b} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]